package com.htjc.integral.conversion.enums;

import java.util.LinkedHashMap;
import java.util.Map;

public class Constant {
	/**
	 * mongodb数据集合商品评价
	 */
	public final static String MONGODB_EVAL_COLL="evaluation";
	
	/**
	 * mongodb数据集合销售记录
	 */
	public final static String MONGODB_SALE_COLL="saleInfo";
	
	/**
	 * mongodb数据集合销售记录
	 */
	public final static String MONGODB_FAVORITE_COLL="favoriteProd";
	
	public static final String LOGIN_SUCCESS = "登录成功";
	public static final String LOGIN_FAILED = "登录失败";
	//登录认证方式
	public static final String LOGIN_AC_WAY = "ssl";
	
	public static final String MESSAGE_CODE = "uc_registerPersonManager_01";
	public static final String ECBPEXCHANGEMANAGERSERVICE_MESSAGE_CODE = "uc_ecBpExchangeManager_01";
	public static final String ACCOUNTMANAGERSERVICE_MESSAGE_CODE = "uc_accountManagerService_01";
	public static final String CHANGEVERIFYMOBILE_MESSAGE_CODE = "uc_changeVerifyMobile_01";
	
	/**
	 * 国网租户code 
	 */
	public static final  String TENANT_CODE_PARAM_VALUE="state_grid";
	/**
	 * 商城个人用户类型code
	 */
    public static final  String APP_CODE_PERSONAL="esgcc_personal";
	/**
	 * mongo返回状态码 成功
	 */
	public static final String RE_CODE_0000="0000";
	public static final String RE_CODE_0100="0100";
	public static final String RE_CODE_0101="0101";
	public static final String RE_CODE_0102="0102";
	public static final String RE_CODE_0103="0103";
	public static final String RE_CODE_0104="0104";
	public static final String RE_CODE_0200="0200";
	
	
	public static final String ZUCESONGJIFEN="注册送积分";
	
	
	/**
	 * 私钥base64字符串
	 */
	public static final String PUB = "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALCFYWc8gGqrKewqXmVY/5eHSRPK2Y3Kn9Wh+upMrMTwa06IrC5s5EQRFItLOyWnzLGdqk2zDwdtSkYTCBqsZ4cCAwEAAQ==";
	/**
	 * 密钥
	 */
	public static final String PRI = "MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAsIVhZzyAaqsp7CpeZVj/l4dJE8rZjcqf1aH66kysxPBrToisLmzkRBEUi0s7JafMsZ2qTbMPB21KRhMIGqxnhwIDAQABAkEAkI4Z7vX/39qdsTYdKXfRj6CNOrUipdgqPkOw/FCgJ4Gy1lTv0dyyrUxlWP0XF9RC4S4sKz05d/e+7ts91/atuQIhANgwTCnYb6SPZx6AgykpEhE5GE5bKonUN5/31icmwgmtAiEA0QcLuc/MOG538xZxKS2+G1cqCoC4Ps78kHa5fH79xIMCIDLoxLbB8iB1aJolNz3VHx0RLekdzNmiMOspyLN1jBINAiAsPN+Abbf84XRFYCSG4IVxZ9sf6eoUcN4G/Pl4na+7XQIgJ1Flq66rss+YCkSuyGMb67YQwR70vlsgcVnygaCdXXg=";

	public static final String ACCESS_KEY = "HHDL";
	public static final boolean isNoVerify = true;
	
	
	/**
	 * 网省编码
	 */
	public static Map<String,String> sourceMap = null;
	
	public static Map<String,String> code5Map = null;
	
	static{
		sourceMap = new LinkedHashMap<String, String>();
		for(EnumEpcSource em: EnumEpcSource.values()){
			sourceMap.put(em.getKey(), em.getValue());
		}
		
		code5Map = new LinkedHashMap<String, String>();
		
		for(EnumEpcSource em: EnumEpcSource.values()){
			code5Map.put(em.getKey(), em.getValue5());
		}
		
	}
	
	public static Map<String, String> getSourceMap() {
		return sourceMap;
	}


	public static String getSourceName(String key){
		return sourceMap.get(key);
	}
	
	public static Map<String, String> getCode5Map() {
		return code5Map;
	}
	
	public static String getCode5Name(String key){
		return code5Map.get(key);
	}
	
	
	public enum  EnumEpcSource{
		AH("340000","EPC_ANHUI","34101"),BJ("110100","EPC_BEIJING","11102"),CQ("500100","EPC_CHONGQING","50101"),FJ("350000","EPC_FUJIAN","35101"),
		GS("620000","EPC_GANSU","62101"),HEB("130000","EPC_HEBEI","13102"),HLJ("230000","EPC_HEILONGJIANG","23101"),HN("410000","EPC_HENAN","41101"),
		HUB("420000","EPC_HUBEI","42102"),HUN("430000","EPC_HUNAN","43101"),JS("320000","EPC_JIANGSU","32101"),JX("360000","EPC_JIANGXI","36101"),
		JB("999999","EPC_JIBEI","13103"),JL("220000","EPC_JILIN","22101"),LL("210000","EPC_LIAOLING","21101"),MD("150000","EPC_MENGDONG","15101"),
		NX("640000","EPC_NINGXIA","64101"),QH("630000","EPC_QINGHAI","63101"),SHANX("140000","EPC_SHANXI","14101"),SD("370000","EPC_SHANDONG","37101"),
		SH("310000","EPC_SHANGHAI","31102"),SX("610000","EPC_SXI","61102"),TJ("120100","EPC_TIANJING","12101"),XJ("650000","EPC_XINJIANG","65101"),
		ZJ("330000","EPC_ZHEJIANG","33101"),SC("510000","EPC_SICHUANG","51101"); 
		/**
		 * 网省编号
		 */
		private String key;
		
		/**
		 * code
		 */
		private String value;
		/**
		 * 5位网省编号
		 */
		private String value5;
		
		private EnumEpcSource(String key ,String value,String value5){
			this.value=value;
			this.key = key;
			this.value5 = value5;
		}
		public String getKey() {
			return key;
		}
		public String getValue() {
			return value;
		}
		public String getValue5() {
			return value5;
		}
		
	}
	
}